/* GUI CONVERTED from rsrsoup.p (converter v1.75) Sat Aug 12 23:15:55 2000 */
/* rsrsoup.p - Release Management Supplier Schedules                    */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*F0PN*/ /*V8:ConvertMode=Maintenance                                   */
/*K1Q4*/ /*V8:RunMode=Character,Windows                                 */
/* REVISION: 7.3    LAST MODIFIED: 04/25/94           BY: WUG *GJ59*    */
/* REVISION: 7.3    LAST MODIFIED: 04/11/95           BY: ame *F0QB*    */
/* REVISION: 8.6    LAST MODIFIED: 05/20/98           BY: *K1Q4* Alfred Tan */
/* REVISION: 8.6    LAST MODIFIED: 04/23/99           BY: *J3DM* Poonam Bahl*/
/* REVISION: 9.1    LAST MODIFIED: 08/12/00           BY: *N0KP* myb        */


          /* UPDATE REMOTE DATABASES PO HEADER RECORD */

/*F0QB*/  {mfdeclre.i}
          define input parameter po_recid as recid.

/*F0QB*   {mfdeclre.i}*/
          define variable old_db as character.
          define new shared frame hf_po_mstr.
          define stream nullstream.
/*F0QB*/  define variable sdb_err as integer no-undo.

/*J3DM*/  FORM /*GUI*/ 
/*J3DM*/     po_sch_mthd format "x(3)"
/*J3DM*/  with frame hf_po_mstr width 80 THREE-D /*GUI*/.


          FORM /*GUI*/ 
             po_mstr
/*J3DM**  with frame hf_po_mstr.   */
/*J3DM*/  with frame hf_po_mstr width 80 THREE-D /*GUI*/.


          find po_mstr where recid(po_mstr) = po_recid no-lock.

          do with frame hf_po_mstr:
             {mfoutnul.i &stream_name=nullstream}
             display stream nullstream po_mstr with frame hf_po_mstr.
             output stream nullstream close.
          end.

          for each pod_det no-lock
          where pod_nbr = po_nbr,
          each si_mstr no-lock
          where si_site = pod_site
          and si_db <> global_db
          break by si_db:
/*GUI*/ if global-beam-me-up then undo, leave.

             if first-of(si_db) then do:
                old_db = global_db.
/*F0QB*         create alias qaddb for database value(si_db).*/
/*F0QB*         global_db = si_db.*/
/*F0QB*/        {gprun.i ""gpalias3.p"" "(input si_db, output sdb_err)"}
/*GUI*/ if global-beam-me-up then undo, leave.


                {gprun.i ""rsrsoupa.p""}
/*GUI*/ if global-beam-me-up then undo, leave.

/*F0QB*         create alias qaddb for database value(old_db).*/
/*F0QB*         global_db = old_db.*/
/*F0QB*/        {gprun.i ""gpalias3.p"" "(input old_db, output sdb_err)"}
/*GUI*/ if global-beam-me-up then undo, leave.

             end.
          end.
/*GUI*/ if global-beam-me-up then undo, leave.

